home *** CD-ROM | disk | FTP | other *** search
- /*
- File: string.h
-
- Contains: String handling
-
- Version: Technology: StdCLib 3.4
- Release: 3.6d2
-
- Copyright: © 1987-1996 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
-
-
- /*
- * Get common declarations
- */
-
- #ifndef __STRING__
- #define __STRING__
-
- #ifndef __CONDITIONALMACROS__
- #include <ConditionalMacros.h>
- #endif
- #ifndef __NULLDEF__
- #include <NullDef.h>
- #endif
- #ifndef __SIZETDEF__
- #include <SizeTDef.h>
- #endif
-
-
-
-
-
- #if PRAGMA_ONCE_SUPPORTED
- #pragma once
- #endif /* PRAGMA_ONCE_SUPPORTED */
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #elif PRAGMA_PACK_SUPPORTED
- #pragma pack(push, 2)
- #endif
-
- /*
- * Copying functions
- */
-
- extern void *memcpy(void *s1, const void *s2, size_t n);
- extern void *memmove(void *s1, const void *s2, size_t n);
- extern char *strcpy(char *s1, const char *s2);
- extern char *strncpy(char *s1, const char *s2, size_t n);
-
- /* Apple library extentions. The prefered mechanism for enabling these is by defining
- * __useAppleExts__. In the absence of this symbol, the __STDC__ symbol is used to
- * enable or disable these extentions. */
-
- #if defined(__useAppleExts__) || defined(applec) && !defined(__STDC__) || defined(__PPCC__) && !__STDC__
-
- extern void *memccpy(void *s1, const void *s2, int c, size_t n);
-
- #endif /* defined(__useAppleExts__) || (( defined(applec) && ! defined(__STDC__) ) || ( defined(__PPCC__) && !__STDC__)) */
-
-
- /*
- * Concatenation functions
- */
-
- extern char *strcat(char *s1, const char *s2);
- extern char *strncat(char *s1, const char *s2, size_t n);
-
- /*
- * Comparison functions
- */
-
- extern int memcmp(const void *s1, const void *s2, size_t n);
- extern int strcmp(const char *s1, const char *s2);
- extern int strcoll(const char *s1, const char *s2);
- extern int strncmp(const char *s1, const char *s2, size_t n);
- extern size_t strxfrm(char *s1, const char *s2, size_t n);
-
- /*
- * Search functions
- */
-
- extern void *memchr(const void *s, int c, size_t n);
- extern char *strchr(const char *s, int c);
- extern size_t strcspn(const char *s1, const char *s2);
- extern char *strpbrk(const char *s1, const char *s2);
- extern char *strrchr(const char *s, int c);
- extern size_t strspn(const char *s1, const char *s2);
- extern char *strstr(const char *s1, const char *s2);
- extern char *strtok(char *s1, const char *s2);
-
- /*
- Re-entrant-safe "strtok". The function "strtok_r" is safe to
- use in re-entrant situations including preemptive
- 68k threads or preemptive tasks provided by the
- Multiprocessing Library for PowerPC/System 7.
-
- To make the prototype for this function visible,
- you must #define _POSIX_THREAD_SAFE_FUNCTIONS 1
- via command-line compiler-directive or equivalent
- option. This function is not available in versions
- of StdCLib prior to 3.5a1.
- */
-
- #if defined(_POSIX_THREAD_SAFE_FUNCTIONS)
- extern char *strtok_r(char *s1, const char *s2, char **lasts);
- #endif /* defined(_POSIX_THREAD_SAFE_FUNCTIONS) */
-
-
- /*
- * Miscellaneous functions
- */
-
- extern void *memset(void *s, int c, size_t n);
- extern char *strerror(int errnum);
- extern size_t strlen(const char *s);
-
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #elif PRAGMA_PACK_SUPPORTED
- #pragma pack(pop)
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __STRING__ */
-
-